package com.lwphk.easydocs.core.parameter.parse;

import java.lang.reflect.Parameter;

import com.lwphk.easydocs.core.ParameterParseAbstract;
import com.lwphk.easydocs.core.vo.ContentType;
import com.lwphk.easydocs.core.vo.MethodInfo;
import com.lwphk.easydocs.core.vo.ParamInfo;

public class UploadParameterHandler extends ParameterParseAbstract {

	
	public void parse(Parameter e, MethodInfo mi)throws Exception {
		
		
		
		
		ParamInfo pi = buildBasicInfo(e);
		if(e.getType().isArray()) {
			pi.setType("File[]");
		}else {
			pi.setType("File");
		}
		mi.setContentType(ContentType.FROM_DATA);
		mi.getBodyParams().add(pi);

	}

}
